/*
 * techniquewrapper.cpp
 *
 *  Created on: 20/11/2012
 *      Author: cvan680
 */

#include "techniquewrapper.h"

using std::make_pair;

namespace voreen{


TechniqueWrapper::TechniqueWrapper(){
	identifier_ = "NF";
	description_ = "NOT FOUND";
	uniqueID_ = -1;
	textype_ = TexType::UNKNOWN;
}
TechniqueWrapper::TechniqueWrapper(string identifier, string description, int uniqueid, int textype){
	identifier_ = identifier;
	description_ = description;
	uniqueID_ = uniqueid;
	textype_ = textype;
}

TechniqueMap::TechniqueMap(){}

TechniqueWrapper TechniqueMap::get(string key){

// FIXME maybe we won't want this hardcoded
		 if(key=="S") { return TechniqueWrapper("S", "Start", TechniqueCodes::START, TexType::UNKNOWN);									}
	else if(key=="Fv"){ return TechniqueWrapper("Fv", "Field: Vector", TechniqueCodes::FIELD_VECTOR, TexType::VECTOR); 					}
	else if(key=="Fs"){ return TechniqueWrapper("Fs", "Field: Scalar", TechniqueCodes::FIELD_SCALAR, TexType::SCALAR); 					}

	else if(key=="vL"){ return TechniqueWrapper("vL", "VectorVis: LIC", TechniqueCodes::VF_LIC, TexType::VECTOR); 						}
	else if(key=="vA"){ return TechniqueWrapper("vA", "VectorVis: Arrow Plot", TechniqueCodes::VF_ARROWPLOT, TexType::COLOUR); 			} // colour because its uploaded as image
	else if(key=="vS"){ return TechniqueWrapper("vS", "VectorVis: StreamLines", TechniqueCodes::VF_STREAMLINES, TexType::SCALAR); 		} // scalar because its uploaded as a binary image (either there IS a line or there ISNT)

	else if(key=="sC"){ return TechniqueWrapper("sC", "ScalarVis: Colourmap", TechniqueCodes::SF_COLOURMAP, TexType::SCALAR); 			}
	else if(key=="sI"){ return TechniqueWrapper("sI", "ScalarVis: Isolines", TechniqueCodes::SF_ISOLINES, TexType::SCALAR); 			}

	else if(key=="iB"){ return TechniqueWrapper("iB", "ImgProc: Gaussian Blur", TechniqueCodes::IMGPROC_GAUSSIAN, TexType::UNKNOWN); 	}
	else if(key=="iE"){ return TechniqueWrapper("iE", "ImgProc: Gradient Edges", TechniqueCodes::IMGPROC_EDGES, TexType::UNKNOWN); 		}

	else if(key=="bO"){ return TechniqueWrapper("bO", "ImgComp: Overlay", TechniqueCodes::IMGCOMP_OVERLAY, TexType::UNKNOWN); 			}
	else if(key=="bW"){ return TechniqueWrapper("bW", "ImgComp: Blend", TechniqueCodes::IMGCOMP_BLEND, TexType::UNKNOWN); 				}
	else if(key=="bB"){ return TechniqueWrapper("bB", "ImgComp: Bumpmap", TechniqueCodes::IMGCOMP_BUMPMAP, TexType::UNKNOWN); 			}

//	else if(key=="D") { return TechniqueWrapper("D", "GeneralSymbol: Field", 500); 		}
//	else if(key=="C") { return TechniqueWrapper("C", "GeneralSymbol: Image", 501); 		}

	return getNULL();
}

TechniqueWrapper TechniqueMap::getNULL(){
	return TechniqueWrapper("NF", "NOT FOUND", -1, TexType::UNKNOWN);
}

}
